import '@babel/polyfill'; 
import {percent} from './percent';
//获取按钮
let btn = document.querySelector("button");

btn.onclick = function(){
    // 30% 中奖  1 - 100   1 2 3
    if(percent(30)){
        alert('恭喜恭喜 xx');
    }else{
        alert('再接再厉 xx');
    }
}

//引入 css 资源
import '../css/app.css';
//引入 less 资源
import '../less/app.less';
//运行环境
window.cls = 'h5210728';
//使用全局变量 $
$('body').css('background','#126');

// console.log('123');
// console.log(2 === 2);
//ES6 的语法
let cls = "H5210728";
let fn = () => {
    console.log('fn fn fn');
}
console.log(cls, fn);

//API 的兼容性
Promise.resolve('ok').then(v => {
    console.log(v);
})


//故意犯错
console.log(123);cls();
